package open.template.work.udm.server.api;

import open.template.work.commons.vo.udm.request.TaskRequestVo;
import open.template.work.commons.vo.udm.resposne.TaskReponseVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class TaskInfoApi {

    private Logger LOGGER= LoggerFactory.getLogger(TaskInfoApi.class);

    @RequestMapping("/task/get")
    public TaskReponseVo popTaskInfo(@RequestBody  TaskRequestVo vo){
        LOGGER.info("获取桶id={}的任务数据",vo.getBucketId());
        TaskReponseVo taskInfoDto = new TaskReponseVo();
        taskInfoDto.setStatus("1");
        taskInfoDto.setTaskId(UUID.randomUUID().toString());
        return taskInfoDto;
    }
}
